var gulp = require('gulp');

var coffee = require('gulp-coffee');
var jade = require('gulp-jade');
var sass = require('gulp-sass');
var uglify = require('gulp-uglify');


gulp.task('jade', [], function(){
    gulp.src(['src/jade/**.jade'])
        .pipe(jade())
        .pipe(gulp.dest("dist"))
    })

gulp.task('sass', [], function(){
    gulp.src(['src/sass/**.scss'])
        .pipe(sass())
        .pipe(gulp.dest('dist'))
    })

gulp.task('coffee', [], function(){
    gulp.src('src/coffee/**.coffee')
        .pipe(coffee())
        .pipe(gulp.dest('dist'));
    })

gulp.task('lib', [], function(){
    gulp.src('src/lib/**')
        .pipe(gulp.dest('dist/lib'))
    })

gulp.task('img', [], function(){
    gulp.src('src/img/**').pipe(gulp.dest('dist/img'))
    })


gulp.task('watch', ['default'], function(){
    gulp.watch('src/coffee/**.coffee', ['coffee']);
    gulp.watch('src/jade/**.jade', ['jade']);
    gulp.watch('src/sass/**.sass', ['sass']);
    gulp.watch('src/lib/**', ['lib']);
    gulp.watch('src/img/**', ['img']);
    })

gulp.task('default', ['jade', 'sass', 'coffee', 'lib', 'img'])